package com.sweet.pack;

import com.sweet.enums.Charset;
import com.sweet.io.file.FileUtil;
import com.sweet.lang.StringUtil;

import java.io.File;
import java.util.List;

/**
 * @author limi
 * @date 2022/11/18 12:30
 */
public class Test {
    public static void main(String[] args) {
//        System.out.println(TimeZone.getDefault());
//        System.out.println(new Date().getTime() / 1000);
//
//        Calendar can = Calendar.getInstance();
//        can.setTimeZone(TimeZone.getTimeZone("UTC+0"));
//        System.out.println(can.getTimeZone());
//        System.out.println(can.getTimeInMillis() / 1000);

        String content = FileUtil.readFileToString(new File("d:/ip.txt"), Charset.UTF8);
        List<String> list = StringUtil.splitToStringListByNewline(content);
        StringBuilder sql = new StringBuilder();
        for (String str : list) {
            sql.append(str.trim()).append("\n");
        }
        FileUtil.createText("d:/a.txt", sql.toString());
    }
}
